#include <stdio.h>
#include <string>

int main()
{
    char ch;
    bool flag = true;
    bool flag_signal = true;
    while ((ch = getchar()) != EOF)
    {
        if (ch == '"')
        {
            printf("%s", flag ? "``" : "''");
            flag = !flag;
        }
        else if(ch=='\''){
            printf("%s",flag_signal ? "`" : "'");
            flag_signal = !flag_signal;
        }
        else{
            printf("%c", ch);
        }
    }
    return 0;
}
